<?php
require("db_config.php");
if(isset($_POST["myID"])){

$software_id=$_POST["myID"];

$con = mysql_connect($db_host,$db_user,$db_password);
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
  
mysql_select_db($db_name, $con);

$result = mysql_query("SELECT id FROM software where software_key='".$software_id."';");
$row = mysql_fetch_array($result);
mysql_query("delete from audit where software_id=".$row['id']." and action='TOKEN-IO:ACCESS';");
mysql_close($con);
echo "1";
}
?>